package org.atovio.coolexam.exception;

import lombok.Getter;
import org.atovio.coolexam.common.HttpCode;

/**
 * 非法请求异常
 */
@Getter
public class RequestException extends RuntimeException{

    // http状态码
    private final int CODE;

    public RequestException(String message) {
        super(message);
        this.CODE = HttpCode.BAD_REQUEST;
    }

    public RequestException(int code, String message) {
        super(message);
        this.CODE = code;
    }
}
